from selenium.webdriver.common.by import By
from commmon.com import BlogDriver


#测试博客详情页
class BlogDetail:
    url = ""
    driver = ""
    def __init__(self):
        self.url = "http://8.137.19.140:9090/blog_detail.html?blogId=97185"
        self.driver = BlogDriver.driver
        self.driver.get( self.url )

    #登录状态下的博客详情页信息（标题，发布时间，具体博客内容）
    def DetailTestByLogin(self):
        self.driver.find_element(By.CSS_SELECTOR,"body > div.container > div.right > div > div.title")
        self.driver.find_element(By.CSS_SELECTOR,"body > div.container > div.right > div > div.date")
        self.driver.find_element(By.CSS_SELECTOR,"#detail > p")
    #屏幕截图
        #BlogDriver.getScreenShot()
